Skip to content

Conversation

@ivanmartos
Copy link

@ivanmartos ivanmartos commented Aug 20, 2025

Resolves #2735


Before the change?

  • currently deleting github_repository_file fails silently
  • when deletinggithub_repository_file then incomplete RepositoryContentFileOptions is passed to github sdk. This means that deletion commit is not signed and in case there is a ruleset requiring signed commits, this delete commit will fail silently
  • currently when all tests are executed for TestAccGithubRepositoryFile they fail with duplicate repository name

After the change?

  • deletion of github_repository_file no longer fails silently, but if there is an error, it is retruned
  • proper RepositoryContentFileOptions is passed to sdk call to DeleteFile (same as for create and update methods). This way commits are signed
  • each TestAccGithubRepositoryFile test execution creates new repository specific for given test

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@ivanmartos ivanmartos changed the title fix: improve error handling and define delete file options fix(github_repository_file): improve error handling and define delete file options Aug 20, 2025
@ivanmartos ivanmartos changed the title fix(github_repository_file): improve error handling and define delete file options fix(github_repository_file): delete error handling and codesigning Aug 20, 2025
@nickfloyd nickfloyd moved this from Backlog to In Review in Terraform Provider Oct 21, 2025
@nickfloyd
Copy link
Contributor

This is technically a breaking change - prior to the change this would fail forward, after the change an error is thrown - functionally the operation does not work either way but user workflows could be disrupted even still.

We'll schedule this one to go out in the up coming major release. Thank you for working on this change - we'll work to get it out the door!

@nickfloyd nickfloyd moved this from In Review to BLOCKED in Terraform Provider Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: BLOCKED

Development

Successfully merging this pull request may close these issues.

[BUG]: Repository Delete File does not include author and comitter

2 participants